/*
 * @Description: 
 * @Author: fhw
 * @Date: 2022-12-03 21:10:17
 */
import { Body, Controller, HttpCode, Post, UseFilters } from '@nestjs/common';
import { ApiResponse, ApiOperation, ApiTags, ApiBody, ApiQuery } from '@nestjs/swagger';
import { DeleteChatGroupDto } from 'src/group-chat/dto/group-chat.dto';
import { HttpExceptionFilter } from 'src/http-exception.filter';
import { SendMailDto } from './dto/mail.dto';
import { EmailService } from './mail.service';

@Controller('mail')
@ApiTags('简历')
export class MailController {
    constructor(
        private readonly exampleService: EmailService,
      ) {}
      @HttpCode(200)
      @Post('/sendMail')
      @ApiQuery({
        description: '发送邮件',
        type: SendMailDto,
      })
      @ApiBody({
        description: '发送邮件',
        type: SendMailDto,
      })
      @ApiOperation({ summary: '发送邮件', operationId: 'sendMail' })
      @UseFilters(new HttpExceptionFilter())
      async sendMail(@Body() body: SendMailDto) {
        return await this.exampleService.example(body)
      }
}
